/*
 * @Descripttion: 文件说明
 * @version: V1.0
 * @Author: GW
 * @Date: 2021-07-29 10:40:41
 * @LastEditors: GW
 * @LastEditTime: 2021-12-18 16:01:24
 */
import { axios } from '../../utils/request'

const api = {
    save: '/po/requisitionOrder/save',//保存请购单
    examine: '/po/requisitionOrder/examine',//审核请购单
    delete: '/po/requisitionOrder/delete',//删除请购单
    getcode: '/po/requisitionOrder/getCode',//获取单据编号
    sub: '/po/requisitionOrder/submit',//单据提交
}

/**
 * 保存请购单
 */
export function save (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 审核请购单
 */
export function examine (data) {
    return axios({
        url: api.examine,
        method: "get",
        params: data
    })
}

/**
 * 删除请购单
 */
export function remove (data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 获取单据编号
 */
export function getCode (data) {
    return axios({
        url: api.getcode,
        method: "get",
        params: data
    })
}

/**
 * 单据提交
 */
export function submitOrder (data) {
    return axios({
        url: api.sub,
        method: "get",
        params: data
    })
}
